Skip to main content

tempName

Type

function

Summary

Returns a unique file name in the folder the operating system uses for temporary files.

Syntax

the tempName
tempName()

Description

Use the tempName function to find an appropriate place to put a temporary file.

You can use temporary files to store intermediate data, downloaded URLs, and other material that is more conveniently placed in a file but does not need to be saved permanently.

Using the tempName function does not create the file, only gets a suggested file name. Use the open file command to create the file.

The file name returned by the tempName function is one that doesn't exist, so you can use it safely. If you need to create another file, use the tempName function again to obtain a new file name.

The location of the temporary files depends on the operating system. Each operating system provides its own location for temporary files.

Examples

the tempName
put the tempName into testDataPath

glossary: absolute file path, command, return, folder

keyword: file

property: filename

command: rename, open file, create folder

control structure: function

function: specialFolderPath, files

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?